package com.dgut.courses_selecting_sys.mapper;

import com.dgut.courses_selecting_sys.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yuec
 * @since 2020-07-23
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    @Select("select count(*) from sys_user where login_name=#{loginName}")
    public int checkLoginNameUnique(String loginName);

    @Select("select * from sys_user where login_name=#{loginName}")
    public User selectUserByLoginName(String loginName);

}
